package com.cyzy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyzy.mapper.UserCouponsMapper;
import com.cyzy.pojo.CouponSeckill;
import com.cyzy.pojo.Passenger;
import com.cyzy.pojo.UserCoupons;
import com.cyzy.service.UserCouponsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserCouponsServiceImpl extends ServiceImpl<UserCouponsMapper, UserCoupons> implements UserCouponsService {

    @Autowired
    private UserCouponsMapper userCouponsMapper;


    @Override
    public List<UserCoupons> selectMyCoupon(long userId) {

//        LambdaQueryWrapper<UserCoupons> wrapper=new LambdaQueryWrapper<>();
//        wrapper.eq(UserCoupons::getUserId,userId)
//                .eq(UserCoupons::getStatus,0);
//        return userCouponsMapper.selectList(wrapper);
        return  userCouponsMapper.selectMyCoupon(userId);
    }
}
